package com.gitee.nacoscenterconfigclient.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName NacosConfigController
 * @Description TODO
 * @Author xiongchao
 * @Date 2021/1/5 10:27
 **/
@RestController
@RefreshScope           //支持nacos配置文件自动更新
public class NacosConfigController {


    @Value("${config.info}")
    private String info;



    @GetMapping("/config/info")
    public String info(){
        return info ;
    }
}
